﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TekaMUD.Engine.Blocks;
using TekaMUD.Engine;
using System.IO;
using TekaMUD.Engine.Commands;
using TekaMUD.Engine.IO;
using TekaMUD.Engine.Agents;

namespace TekaMUD
{
	public class EntryPoint
	{
		public static void Main(string[] args)
		{	
			#region test code
			/*

			northMainDoor.AssignKey(blueKey.CombinationCode);
			eastMainDoor.AssignKey(yellowKey.CombinationCode);
			
			root.RoomObjects.Store(new WaterFountain());

			Cat agent1 = new Cat();
			World.Current.AssignNpcToRoom(agent1, root);

			 * */

			#endregion

			Control.Initialize(true);

			while (true)
			{
				StdioChannel sc = new StdioChannel(PlayerManager.GetNewPlayer(), Console.In, Console.Out);

				ChannelManager.RegisterNewChannel(sc);

				sc.ReadLoop();
			}
		}
	}
}
